﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProyectoEscuela
{
    class Global
    {

        private static volatile Global _instance = null;

        public dbProyectoEscuelaDataContext db;

        public static Global getInstance()
        {
            if (_instance == null){

                lock (typeof(Global))
                {
                    if (_instance == null)
                    {
                        _instance = new Global();
                    }
                }
            }
            return _instance;

        }

        protected Global() {
            db = new dbProyectoEscuelaDataContext();
        }

       

    }


   

}
